import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/login',
            name: 'login',
            component: resolve => require(['@/view/Login'], resolve)
        },
        {
            path: '/platform',
            name: 'platform',
            component: resolve => require(['@/view/Platform'], resolve),
            children: [{
                path: 'dept',
                name: 'dept',
                component: resolve => require(['@/view/Platform/BodyPage/Dept'], resolve)
            }, {
                path: 'user',
                name: 'user',
                component: resolve => require(['@/view/Platform/BodyPage/User'], resolve)
            }]
        },
        {
            path: '/gnervcat',
            name: 'gnervcat',
            component: resolve => require(['@/view/Gnervcat'], resolve),
            children: [{
                path: 'alltable',
                name: 'alltable',
                component: resolve => require(['@/view/Gnervcat/GContentMysql/TableList'], resolve)
            }, {
                path: 'redis',
                name: 'redis',
                component: resolve => require(['@/view/Platform/BodyPage/Dept'], resolve)
            }]
        },
        {
            path: '*',
            redirect: '/'
        }
    ]
})
